package cn.green.mapper.store;

import cn.green.mapper.model.impls.table.EntityTableMapper;

import java.util.HashMap;
import java.util.Map;

/**
 * @author wang.yishu
 * @version 1.0
 * @className EntityTableMapperStore
 * @description 实体映射仓库
 * @date 2025/7/23 10:22
 */
public class EntityTableMapperStore {
    //核心仓库
    private static final Map<Class<?>, EntityTableMapper> MAPPERS = new HashMap<>();

    public static void add(Class<?> eClass, EntityTableMapper mapper) {
        MAPPERS.put(eClass, mapper);
    }

    public static boolean contains(Class<?> eClass) {
        return MAPPERS.containsKey(eClass);
    }

    public static EntityTableMapper get(Class<?> eClass) {
        return MAPPERS.get(eClass);
    }

}
